Active link cable diagnostics

ABSTRACT

A novel apparatus for and method of estimating the cable length of an active network link. The cable diagnostics mechanism of the invention is particularly suited for use in estimating the length of Ethernet network between two edges when the link is active, i.e. data is being transmitted in both directions simultaneously and the transmission of test pulses is not possible. The cable length estimation mechanism of the present invention is based on a well-known property of the spectrum of the insertion loss of the cable, namely, the linear relationship between the attenuation of the cable at a given frequency in decibels and the cable length. Information characterizing this relationship is extracted and used to determine the length of the cable.

REFERENCE TO PRIORITY APPLICATION

This application claims priority to U.S. Provisional Application Ser.No. 60/788,409, filed Mar. 31, 2006, entitled “Active link cablediagnostics”, incorporated herein by reference in its entirety.

FIELD OF THE INVENTION

The present invention relates to the field of data communications andmore particularly relates to an apparatus for and method of active linkcable diagnostics.

BACKGROUND OF THE INVENTION

Modern network communication systems are generally of either the wiredor wireless type. Wireless networks enable communications between two ormore nodes using any number of different techniques. Wireless networksrely on different technologies to transport information from one placeto another. Several examples include, for example, networks based onradio frequency (RF), infrared, optical, etc. Wired networks may beconstructed using any of several existing technologies, includingmetallic twisted pair, coaxial, optical fiber, etc.

Communications in a wired network typically occurs between twocommunication transceivers over a length of cable making up thecommunications channel. Each communications transceiver comprises atransmitter and receiver components. A fault along the communicationchannel causes a disruption in communications between the transceivers.Typically, it is desirable to be able to determine when a fault occursin the channel. Once a fault is detected, it is desirable to determineinformation about the fault, such as its location along the channel.

The deployment of faster and faster networks is increasing at an everquickening pace. Currently, the world is experiencing a vast deploymentof Gigabit Ethernet (GE) devices. As the number of installed gigabitEthernet nodes increases, the need for reliable, comprehensive anduser-friendly cable diagnostic tools has become more important thanever. The wide variety of cables, topologies and connectors deployedresults in the need for non-intrusive identification and reporting ofcable faults.

As part of a diagnostics capability, an important feature in theEthernet plant is the ability to measure the length of the cable betweentwo edges. This could be achieved in two different modes of operation: anon-active link mode and an active link mode of operation.

Performing cable diagnostics in active mode is problematic as duringthis mode of operation, data is sent in both directions. Furthermore,unlike in the non-active mode, the transmission of test pulses is notpossible.

Thus, there is a need for a cable diagnostics mechanism that provides ameans of performing cable diagnostics that overcomes the disadvantage ofthe prior art. The diagnostics mechanism should be capable of estimatingthe length of an Ethernet cable between two points. The mechanism shouldalso be able to estimate the length of the cable while in the cable isin an active mode of operation. Further, it is desirable that thediagnostic mechanism be incorporated into a conventional communicationstransceiver without requiring extensive modifications to thetransceiver.

SUMMARY OF THE INVENTION

The present invention is an apparatus for and method of estimating thecable length of an active network link. The cable diagnostics mechanismof the invention is particularly suited for use in estimating the lengthof Ethernet network between two edges when the link is active, i.e. datais being transmitted in both directions simultaneously and thetransmission of test pulses is not possible.

The cable length estimation mechanism of the present invention is basedon a well-known property of the spectrum of the insertion loss of thecable. Namely, the linear relationship between the attenuation of thecable at a given frequency in decibels and the cable length. Informationcharacterizing this relationship can be extracted and used to determinethe length of the cable. In one embodiment, data needed to calculate thecable length is obtained from a plurality of equalizer coefficients inthe PHY circuit. In a second embodiment, data needed to calculate thecable length is obtained from the signal received over the cable. Inorder to avoid gain issues, the channel spectrum is sampled at twodifferent frequencies and the slope of the relationship between cableattenuation and length is calculated. The linear relationship remainsvalid permitting the cable length to be calculated using the well-knownequation length=a·slope+b.

Note that depending on the actual implementation, the calculation of thecable length estimate may be performed completely in the PHY circuititself or may be performed partially in the PHY circuit and partially inthe host (i.e. in-circuit or external processor).

To aid in understanding the principles of the present invention, thedescription is provided in the context of a cable diagnostics modulesuitable for use in a cable system such as a DOCSIS 3.0 capable cablesystem comprising a cable modem adapted to receive an RF feed from acable head-end (i.e. CMTS) and to distribute video, Internet andtelephony to a subscriber premises. It is appreciated, however, that theinvention is not limited to use with any particular communication deviceor standard and may be used in optical, wired and wireless applications.Further, the invention is not limited to use with a specific technologybut is applicable to any system that employs differentialencoding/decoding and FEC decoding such as Reed Solomon decoding.

Note that many aspects of the invention described herein may beconstructed as software objects that are executed in embedded devices asfirmware, software objects that are executed as part of a softwareapplication on either an embedded or non-embedded computer systemrunning a real-time operating system such as WinCE, Symbian, OSE,Embedded LINUX, etc. or non-real time operating system such as Windows,UNIX, LINUX, etc., or as soft core realized HDL circuits embodied in anApplication Specific Integrated Circuit (ASIC) or Field ProgrammableGate Array (FPGA), or as functionally equivalent discrete hardwarecomponents.

There is thus provided in accordance with the invention, a method ofestimating the cable length of an active link in a network, the methodcomprising the steps of determining a first channel spectrum magnitudeat a first frequency and a second channel spectrum magnitude at a secondfrequency, calculating a channel spectrum slope from the first channelspectrum magnitude and the second channel spectrum magnitude andcalculating the cable length estimate from the channel spectrum slope.

There is also provided in accordance with the invention, an apparatusfor estimating the cable length of an active link in a networkcomprising means for measuring a first attenuation over the link at afirst frequency and a second attenuation over the link at a secondfrequency, means for calculating slope as a function of the firstattenuation and the second attenuation measurements and means forcalculating the cable length estimate as a function of the slope andlinear calibration constants K₁ and K₂.

There is further provided in accordance with the invention, a cablemodem comprising a memory, one or more interface ports, a tuner coupledto a CATV cable having a plurality of channels, the tuner operative totune a received broadband signal in accordance with a tune command, aPHY circuit coupled to the tuner and operative to generate a basebandsignal from the output of the tuner, a cable diagnostics module forestimating the slope of the linear relationship between cableattenuation and length for an active link in a network, the cablediagnostics module comprising means for measuring a first attenuationover the link at a first frequency and a second attenuation over thelink at a second frequency, means for calculating slope as a function ofthe first attenuation and the second attenuation measurements and aprocessor coupled to the memory, the one or more interface ports, thetuner, the cable diagnostics module and the PHY circuit, the processorcomprising means for calculating the cable length estimate as a functionof the slope and linear calibration constants K₁ and K₂.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention is herein described, by way of example only, withreference to the accompanying drawings, wherein:

FIG. 1 is a block diagram illustrating an example cable modem systemincorporating the active link cable diagnostic mechanism of the presentinvention;

FIG. 2 is a block diagram illustrating an example Ethernet PHY schemeincorporating the cable diagnostic mechanism of the present invention;

FIG. 3 is a flow diagram illustrating the cable length estimation methodof the present invention;

FIG. 4 is a graph illustrating the linear relationship between thespectrum slope and the cable length;

FIG. 5 is a flow diagram illustrating an exemplary DFT length estimationvalidation algorithm of the present invention;

FIG. 6 is a block diagram illustrating an example fixed point signalflow of the present invention;

FIG. 7 is a block diagram illustrating an example table implementationscheme of the present invention;

FIG. 8 is a diagram illustrating the comparison of example results forreal and estimated lengths;

FIG. 9 is a diagram illustrating simulation results of a DFT lengthestimation for a single segment;

FIG. 10 is a diagram illustrating the slope of the simulated signalspectrum;

FIG. 11 is a diagram illustrating the error of the simulation of FIG.10;

FIG. 12 is a diagram illustrating the best linear fit to the signalspectrum slope; and

FIG. 13 is a diagram illustrating the comparison of results for real andestimated lengths.

DETAILED DESCRIPTION OF THE INVENTION Notation Used Throughout

The following notation is used throughout this document.

Term Definition AC Alternating Current ASIC Application SpecificIntegrated Circuit CATV Community Antenna Television or Cable TV CMTSCable Modem Termination System CO Central Office CPU Central ProcessingUnit DC Direct Current DFE Decision Feedback Equalizer DFT DiscreteFourier Transform DOCSIS Data Over Cable Service Interface SpecificationDSP Digital Signal Processor EEROM Electrically Erasable Read OnlyMemory FEC Forward Error Correction FFE Feed Forward Equalizer FFT FastFourier Transform FPGA Field Programmable Gate Array GE Gigabit EthernetGPIO General Purpose I/O HDL Hardware Description Language HPF High PassFilter I/O Input/Output IC Integrated Circuit IEEE Institute ofElectrical and Electronic Engineers IP Internet Protocol LAN Local AreaNetwork LED Light Emitting Diode LUT Lookup Table MAC Media AccessControl MSB Most Significant Bit NCO Numerically Controlled OscillatorPOTS Plain Old Telephone Service QAM Quadrature Amplitude Modulation RAMRandom Access Memory RF Radio Frequency ROM Read Only Memory RS ReedSolomon SLIC Subscriber Line Interface Card USB Universal Serial BusVoIP Voice over IP WLAN Wireless Local Area Network

DETAILED DESCRIPTION OF THE INVENTION

The present invention is a novel apparatus for and method of estimatingthe cable length of an active network link. The cable diagnosticsmechanism of the invention is particularly suited for use in estimatingthe length of Ethernet network between two edges when the link isactive, i.e. data is being transmitted in both directions simultaneouslyand the transmission of test pulses is not possible.

The cable length estimation mechanism of the present invention is basedon a well-known property of the spectrum of the insertion loss of thecable. Namely, the linear relationship between the attenuation of thecable at a given frequency in decibels and the cable length. Informationcharacterizing this relationship can be extracted and used to determinethe length of the cable. In one embodiment, data needed to calculate thecable length is obtained from a plurality of equalizer coefficients inthe PHY circuit. In a second embodiment, data needed to calculate thecable length is obtained from the signal received over the cable. Inorder to avoid gain issues, the channel spectrum is sampled at twodifferent frequencies and the slope of the relationship between cableattenuation and length is calculated. The linear relationship remainsvalid permitting the cable length to be calculated using the well-knownequation length=a·slope+b.

Note that depending on the actual implementation, the calculation of thecable length estimate may be performed completely in the PHY circuititself or may be performed partially in the PHY circuit and partially inthe host (i.e. in-circuit or external processor).

To aid in understanding the principles of the present invention, thedescription is provided in the context of a cable diagnostic modulesuitable for use in a cable system such as a DOCSIS 3.0 capable cablesystem comprising a cable modem adapted to receive an RF feed from acable head-end (i.e. CMTS) and to distribute video, Internet andtelephony to a subscriber premises. It is appreciated, however, that theinvention is not limited to use with any particular communication deviceor standard and may be used in optical, wired and wireless applications.Further, the invention is not limited to use with a specific technologybut is applicable to any system that employs differentialencoding/decoding and FEC decoding such as Reed Solomon (RS) decoding.

Note that throughout this document, the term communications device isdefined as any apparatus or mechanism adapted to transmit, or transmitand receive data through a medium. The communications device may beadapted to communicate over any suitable medium such as RF, wireless,infrared, optical, wired, microwave, etc. In the case of wirelesscommunications, the communications device may comprise an RFtransmitter, RF receiver, RF transceiver or any combination thereof.

The term cable modem is defined as a modem that provides access to adata signal sent over the cable television infrastructure. The termvoice cable modem is defined as a cable modem that incorporates VoIPcapabilities to provide telephone services to subscribers. Channelbonding is defined as a load-sharing technique for logically combiningmultiple DOCSIS channels into a single virtual pipe. It is described indetail in the DOCSIS 3.0 specification, incorporated herein by referencein its entirety.

The word ‘exemplary’ is used herein to mean ‘serving as an example,instance, or illustration.’ Any embodiment described herein as“exemplary” is not necessarily to be construed as preferred oradvantageous over other embodiments.

Voice Cable Modem Incorporating Active Cable Diagnostics

A block diagram illustrating an example cable modem incorporating anactive cable diagnostics mechanism of the present invention is shown inFIG. 1. The cable modem, generally referenced 10, comprises a tuner 14,DOCSIS PHY circuit 16 incorporating a cable diagnostics block 17operative to implement the active cable diagnostics mechanism of thepresent invention, DOCSIS compatible processor 24 also incorporating ahost portion 25 of the cable diagnostics mechanism of the invention,VoIP processor 42, voice codec 44, subscriber line interface card (SLIC)46, phone port 48, antenna 56, wireless local area network (WLAN) 58,Ethernet interface 26, Ethernet LAN port 28, general purpose (I/O)(GPIO) interface 30, LEDs 32, universal serial bus (USB) interface 34,USB port 36, AC adapter 52, power management circuit 50, ROM 20, RAM 18and FLASH memory 22. Note that in the example embodiment presentedherein, the cable modem and DOCSIS enabled processor 24 are adapted toimplement the DOCSIS 3.0 standard.

In operation, the cable modem processor 24 is the core chip set which inthe example presented herein comprises a central single integratedcircuit (IC) with peripheral functions added. The voice over IP (VoIP)processor 42 implements a mechanism to provide phone service outside thestandard telco channel. Chipset DSPs and codecs 44 add the functionalityof POTS service for low rate voice data.

The cable modem also comprises a subscriber line interface card (SLIC)46 which functions to provide the signals and functions of aconventional local loop to a plurality of telephone devices connectedvia the phone port 48 using internal 2-wire telephone wiring. Inparticular, it generates call progress tones including dial tone, ringtone, busy signals, etc. that are normally provided by the local loopfrom the CO. Since the telephone deices are not connected to the CO, theSLIC in the cable modem must provide these signals in order that thetelephone devices operate correctly.

In a traditional analog telephone system, each telephone or othercommunication device (i.e. subscriber unit) is typically interconnectedby a pair of wires (commonly referred to as tip and ring or together assubscriber lines, subscriber loop or phone lines) through equipment to aswitch at a local telephone company office (central office or CO). Atthe CO, the tip and ring lines are interconnected to a SLIC whichprovides required functionality to the subscriber unit. The switches atthe central offices are interconnected to provide a network of switchesthereby providing communications between a local subscriber and a remotesubscriber.

The SLIC is an essential part of the network interface provided toindividual analog subscriber units. The functions provided by the SLICinclude providing talk battery (between 5 VDC for on-hook and 48 VDC foroff-hook), ring voltage (between 70-90 VAC at a frequency of 17-20 Hz),ring trip, off-hook detection, and call progress signals such asringback, busy, and dial tone.

A SLIC passes call progress tones such as dial tone, busy tone, andringback tone to the subscriber unit. For the convenience of thesubscriber who is initiating the call, these tones normally provided bythe central office give an indication of call status. When the callingsubscriber lifts the handset or when the subscriber unit otherwisegenerates an off hook condition, the central office generates a dialtone and supplies it to the calling subscriber unit to indicate theavailability of phone service. After the calling subscriber has dialed aphone number of the remote (i.e. answering) subscriber unit, the SLICpasses a ring back sound directed to the calling subscriber to indicatethat the network is taking action to signal the remote subscriber, i.e.that the remote subscriber is being rung. Alternatively, if the networkdetermines that the remote subscriber unit is engaged in another call(or is already off-hook), the network generates a busy tone directed tothe calling subscriber unit.

The SLIC also acts to identify the status to, or interpret signalsgenerated by, the analog subscriber unit. For example, the SLIC provides−48 volts on the ring line, and 0 volts on the tip line, to thesubscriber unit. The analog subscriber unit provides an open circuitwhen in the on-hook state. In a loop start circuit, the analogsubscriber unit goes off-hook by closing, or looping the tip and ring toform a complete electrical circuit. This off-hook condition is detectedby the SLIC (whereupon a dial tone is provided to the subscriber). Mostresidential circuits are configured as loop start circuits.

Connectivity is provided by a standard 10/100/1000 Mbps Ethernetinterface 26 and Ethernet LAN port 28, USB interface 34 and USB port 36or with additional chip sets, such as wireless 802.11a/b/g via WLANinterface 58 coupled to antenna 56. In addition, a GPIO interface 30provides an interface for LEDs 32, etc. The network connectivityfunctions may also include a router or Ethernet switch core. Note thatthe Ethernet MAC 38 and PHY 16 are typically integrated into the cablemodem processor 24 or may be separate as shown in FIG. 1 wherein theDOCSIS PHY circuit 16 is shown separate from the processor 24.

In the example embodiment presented herein, the tuner 14 is coupled tothe CATV signal from the CMTS via port 12 and is operative to convertthe RF signal received over the RF cable to an IF frequency inaccordance with a tune command received from the processor.

The cable modem 10 comprises a processor 24 which may comprise a digitalsignal processor (DSP), central processing unit (CPU), microcontroller,microprocessor, microcomputer, ASIC, FPGA core or any other suitableprocessing means. The cable modem also comprises static read only memory(ROM) 20, dynamic main memory 18 and FLASH memory 22 all incommunication with the processor via a bus (not shown).

The magnetic or semiconductor based storage device 18 (i.e. RAM) is usedfor storing application programs and data. The cable modem comprisescomputer readable storage medium that may include any suitable memorymeans, including but not limited to, magnetic storage, optical storage,semiconductor volatile or non-volatile memory, biological memorydevices, or any other memory storage device.

Although in the example provided herein, the active cable diagnosticsmechanism is implemented in hardware and partly in software for the hostportion, in alternative embodiments it could be implemented in softwareor a combination of hardware and software. Software adapted to implementthe active cable diagnostics mechanism of the present invention isadapted to reside on a computer readable medium, such as a magnetic diskwithin a disk drive unit. Alternatively, the computer readable mediummay comprise a floppy disk, removable hard disk, Flash memory 22, EEROMbased memory, bubble memory storage, ROM storage 20, distribution media,intermediate storage media, execution memory of a computer, and anyother medium or device capable of storing for later reading by acomputer a computer program implementing the system and methods of thisinvention. The software adapted to implement the active cablediagnostics mechanism of the present invention may also reside, in wholeor in part, in the static or dynamic main memories 18 or in firmwarewithin the processor of the computer system (i.e. withinmicrocontroller, microprocessor or microcomputer internal memory).

Using FFE-DFE Coefficients

The estimation of cable length as performed by the invention is based ona well-known property of the spectrum of the insertion loss, i.e. thelinear relationship between the attenuation at a given frequency indecibels and the cable length. This information can be extracted eitherfrom the equalizer coefficients or from the received signal in the PHYcircuit. In order to avoid gain issues, the spectrum is sampled at twodifferent frequencies and the slope is then calculated. The linearrelation remains valid so the length can be calculated in a simple wayusing

length=a·slope+b  (1)

Depending on the implementation, this calculation can be performed onthe host, e.g., processor 24 (FIG. 1) or can be performed in hardware inthe PHY 16.

A block diagram illustrating an example Ethernet PHY schemeincorporating the cable diagnostic mechanism of the present invention isshown in FIG. 2. The circuit, generally referenced 60, is a portion ofthe PHY circuit 16 (FIG. 1). The circuit comprises a feed forwardequalizer (FFE) 62, adders 66, 70, echo canceller 64, slicer 72,decision feedback equalizer (DFE) 74 and cable diagnostics block 68.Depending on the implementation, the cable diagnostics block 68 isoperative to either generate slope information which is then processedfurther by the host to estimate cable length or to generate the cablelength directly thus obviating the need for the host processing. Inoperation, the cable diagnostics block of the invention generates theslope/length information using the FFE and DFE coefficients as input.

The attenuation of the cable is given as a function of the frequency,and is linear with the cable length (per frequency). Thus, the slope ofthe spectrum indicates the cable length. The channel spectrum isestimated by performing a discrete Fourier transform (DFT) on the feedforward equalizer and decision feedback equalizer (DFE) coefficients.This procedure is performed at two frequencies. For example, at 7 MHzand 43 MHz. The spectrum in each frequency is given by

$\frac{{DFT}({FFE})}{{DFT}({DFE})}$

hence the slope (at frequencies f1 and f2) is given by

$\begin{matrix}{{slope} = {\frac{{{DFT}\left( {{FFE},{f\; 1}} \right)}\lbrack{dB}\rbrack}{{{DFT}\left( {{DFE},{f\; 1}} \right)}\lbrack{dB}\rbrack} - \frac{{{DFT}\left( {{FFE},{f\; 2}} \right)}\lbrack{dB}\rbrack}{{{DFT}\left( {{DFE},{f\; 2}} \right)}\lbrack{dB}\rbrack}}} & (2)\end{matrix}$

In order to translate the DFT results to decibels, the mechanism uses alogarithmic look up table. The slope calculation is then given by thefollowing

slope=log(DFT(FFE,f2))+log(DFT(DFE,f1))−log(DFT(FFE,f1))−log(DFT(DFE,f2))  (3)

The basic DFT processor is a direct implementation of the DFT equations:

$\begin{matrix}{x_{real} = {\sum\limits_{n = 0}^{N - 1}\; {a_{n}{\cos \left( {2\pi \; {fn}} \right)}}}} & (5) \\{x_{imag} = {\sum\limits_{n = 0}^{N - 1}\; {a_{n}{\sin \left( {2\; \pi \; {fn}} \right)}}}} & (6) \\{{x}^{2} = {x_{real}^{2} + x_{imag}^{2}}} & (7)\end{matrix}$

Note that for a predetermined frequency, the sine and cosine values areconstants but are affected by the number of coefficients supplied. UsingSignal Spectrum

Based on the same principal of the FFE-DFE slope, the cable length isestimates according to the channel spectrum slope. A flow diagramillustrating the cable length estimation method of the present inventionis shown in FIG. 3. To achieve this, several DFT operations areperformed on the signal at two different frequencies (step 80). Thefrequency spectrum is sampled one or more times at each frequency. Thesamples are averaged to determine the spectrum magnitude at the desiredfrequencies (step 82). The slope is then calculated the spectrummagnitude data (step 84). The cable length is then estimated using theslope (step 86).

Note that the linearity to the cable length is maintained in this caseas well. In order to obtain fine spectrum estimation, the signal has tobe very long (e.g., 4 Msymbols) in order to get an error of less than2-3 meters, as shown in Table 1 below. Note that we need to obtain theinput signal from the slicer input before DFE correction because it isthe echo that should preferably be cancelled first.

TABLE 1 Average FFT length versus maximum error Average FFT Max Error(meters) 512 10 1024 7.5 2048 5 4096 2.5

Depending on the implementation, the FFE may have a third tap in thepresence of echo in long cables, which ‘shortens’ the channel thusrelaxing the echo canceling demands. This third tap is compensated forby the DFE processing later on. Since the signal for the cablediagnostics is taken from the echo canceller output (i.e. after theFFE), the third tap of the FFE must be compensated for. If the third tapis not compensated for, although it is minor in value, it has a 2-3meter error enhancement which results in a possible 5-6 meter lengthestimation error.

Compensation can be done as follows:

$\begin{matrix}{{{ffe\_ out}\lbrack n\rbrack} = {{{- \frac{1}{8}}{{ffe\_ in}\left\lbrack {n + 1} \right\rbrack}} + {{ffe\_ in}\lbrack n\rbrack} + {\alpha \cdot {{ffe\_ in}\left\lbrack {n - 1} \right\rbrack}}}} & (8)\end{matrix}$

where α is the third tap of the FFE. With knowledge that the FFE of twoconstant taps has no effect on the cable diagnostics operation, weattempt to eliminate the third tap effect by:

cable_diag_in[n]=ffe_out[n]−α·ffe_in[n−1]  (9)

This requires an additional adder to subtract the third tap of the FFE.Since the first tap of the FFE is configurable, however, the linearconstants should be configurable as well according to this value whicheffects the spectrum and hence the slope. This is not practical sincethe first tap comprises 5-bits and it may be configured differently forvarious cable lengths and thus requires the host to be informed of thefirst tap that was used in order to calculate the cable length estimate.

The solution to this problem is to fully compensate for the FFE affecton the spectrum by dividing its FFT transform. Thus, for the FFEcoefficients we repeat the action taken with the DFE in the equalizerslope option. Thus the slope is given by

slope=log(DFT(SIG, f2))+log(DFT(FFE, f1))−log(DFT(SIG, f1))−log(DFT(FFE,f2))  (10)

Another difference from the FFE-DFE mode is the frequencies actuallyexamined. Here the low frequency is 24/1024 (1.46 MHz) and the highfrequency is 174/1024 (10.6 MHz), which were found empirically to yieldoptimal results.

It is noted that the best results were achieved using frequencies thattheoretically do not have much energy due to the high pass filter (HPF)at 6 MHz. This might result from the fact that when measuringfrequencies 7 MHz and 43 MHz, the slope is affected dramatically if thevalue measured at one frequency is higher while the value measured atthe second frequency is a lower than expected. When measuring 1.4 MHzand 10.6 MHz, for example, we are affected at only one frequency (i.e.10.6 MHz) since 1.4 MHz is masked by the HPF.

Module Calibration

As described supra, a linear relation exists between the channelspectrum slope (hereinafter denoted SLP) and the cable length(hereinafter denoted as LEN) such that SLP=x₂·LEN+x₁ as shown in FIG. 4.In one embodiment, the output of the cable diagnostic module 68 (FIG. 3)is the SLP. In this case, the SLP value is read by a host or otherprocessing entity (i.e. processor 24 (FIG. 1) and used to calculate thecable length estimate. The host extracts the LEN by inverting the linearrelationship between slope and cable length yielding LEN=A·SLP+B, whereA=1/x₂ and B=x₁/x₂. In an alternative embodiment, however, the cablediagnostic module is operative to generate not only the SLP but also thecable length estimate (shown as dotted arrow).

Note that the constant x₁ is length independent hence it is a systemparameter. It can be calculated using simulations but can be modifiedwhen the mechanism is implemented in hardware. Note also that if only asingle point (i.e. SLP) on the linear line is provided, x₂ can becalculated from the expression x₂=(SLP−x₁)/LEN. In this case, x₁ is setto its default value. In addition, if several points (i.e. severalmeasurements of SLP for different lengths) are available, a leastsquares method is used to determine A and B directly.

The invention provides for three modes of calibration as follows. In thefirst mode, x₁ and x₂ (hence A and B) are set to the default values ascalculated by simulations using IEEE cable models. This calibration mode(i.e. using default values) yields errors within approximately 10 m. Inthe second mode, a single SLP is measured by the user wherein x₁ is setto a default value and x₂ is calculated accordingly as described supra.Then, A and B are calculated using x₁ and x₂. In this calibration mode(i.e. using a single measurement), the measurement must be made using along cable (i.e. 100 m or longer). The resultant errors should notexceed 5 meters. In the third mode, more than one SLP value is measuredby the user. In this case, a least squares estimation is performed tocalculate A and B. In this calibration mode (i.e. multiple measurements)errors are within 5 meters, in the case of four SLP measurements.

DFT Length Estimation

It is well-known in the art that the attenuation of the network cable islinear with the cable length (for a particular frequency). In order toachieve independency of signal gain, the spectrum slope is measured attwo frequencies. Note that the slope is also linear with cable length.The objective of this section is to describe and clarify the process ofestimating the cable length using the signal spectrum.

Let us denote the following

$\begin{matrix}{{{A_{H}\left( {L,f} \right)}\lbrack{dB}\rbrack} = {{A_{H\; 100}(f)} \cdot {\frac{L}{100}\lbrack{dB}\rbrack}}} & (11) \\{{{A_{P}\left( {L,f} \right)}\lbrack{dB}\rbrack} = {{{A_{P\; 100}(f)} \cdot {\frac{L}{100}\lbrack{dB}\rbrack}} = {{A_{H}\left( {L,f} \right)} \cdot {1.2\lbrack{dB}\rbrack}}}} & (12)\end{matrix}$

where

A_(H)(L,f) denotes the attenuation of a horizontal cable of length L atfrequency f;

A_(H100)(f) denotes the attenuation of a horizontal cable of length 100m;

A_(P)(L,f) denotes the attenuation of a patch cable of length L atfrequency f;

Let us also denote the length-independent attenuation as B(f), whichrepresents a spectral mask which is independent of the cable length(i.e. a system parameter resulting from the filtering and physics of thesystem).

As described supra, the cable diagnostics module 68 (FIG. 2) isoperative to measure the slope of the signal spectrum denoted as slp. Incase of a horizontal cable with no patches, the slp can be expressed asthe following:

$\begin{matrix}{{{slp}(L)} = {{\left\lbrack {{A_{H\; 100}\left( {f\; 1} \right)} - {A_{H\; 100}\left( {f\; 2} \right)}} \right\rbrack \cdot \frac{L}{100}} + {B\left( {f\; 1} \right)} - {B\left( {f\; 2} \right)}}} & (13)\end{matrix}$

The cable length L can be extracted from the slp by the linear operation

L=K ₁ ·slp+K ₂  (14)

where the constants K₁ and K₂ are given by

$\begin{matrix}{K_{1} = \frac{100}{{A_{H\; 100}\left( {f\; 1} \right)} - {A_{H\; 100}\left( {f\; 2} \right)}}} & (15) \\{K_{2} = {- \frac{100 \cdot \left\lbrack {{B\left( {f\; 1} \right)} - {B\left( {f\; 2} \right)}} \right\rbrack}{{A_{H\; 100}\left( {f\; 1} \right)} - {A_{H\; 100}\left( {f\; 2} \right)}}}} & (16)\end{matrix}$

Note that these variables should be provided by the user.

If the cable topology comprises a combination of horizontal and patchcables, the slope is given instead by the following expression

$\begin{matrix}{{{slp}\left( {L_{H},L_{P}} \right)} = {{{\left\lbrack {{A_{H\; 100}\left( {f\; 1} \right)} - {A_{H\; 100}\left( {f\; 2} \right)}} \right\rbrack \cdot \frac{L_{H}}{100}} + {\left\lbrack {{A_{p\; 100}\left( {f\; 1} \right)} - {A_{P\; 100}\left( {f\; 2} \right)}} \right\rbrack \cdot \frac{L_{P}}{100}} + {B\left( {f\; 1} \right)} - {B\left( {f\; 2} \right)}} = {{\left\lbrack {{A_{H\; 100}\left( {f\; 1} \right)} - {A_{H\; 100}\left( {f\; 2} \right)}} \right\rbrack \cdot \frac{L_{H}}{100}} + {\left\lbrack {{A_{H\; 100}\left( {f\; 1} \right)} - {A_{H\; 100}\left( {f\; 2} \right)}} \right\rbrack \cdot 1.2 \cdot \frac{L_{P}}{100}} + {B\left( {f\; 1} \right)} - {B\left( {f\; 2} \right)}}}} & (17)\end{matrix}$

In this case the cable length L is extracted from the slp by the linearoperation

L _(H) =K ₁ ·slp+K ₂  (18)

where the constants K₁ and K₂ are given by

$\begin{matrix}{K_{1} = \frac{100}{{A_{H\; 100}\left( {f\; 1} \right)} - {A_{H\; 100}\left( {f\; 2} \right)}}} & (19) \\{K_{2} = {- \left( {\frac{{B\left( {f\; 1} \right)} - {B\left( {f\; 2} \right)}}{{A_{H\; 100}\left( {f\; 1} \right)} - {A_{H\; 100}\left( {f\; 2} \right)}} + \frac{1.2 \cdot L_{P}}{100}} \right)}} & (20)\end{matrix}$

These results have been validated using Matlab simulation. The model isgiven by

LEN=K ₁ ·slp+K ₂  (21)

or

slp=C ₁ ·LEN+C ₂  (22)

A flow diagram illustrating an exemplary DFT length estimationvalidation algorithm of the present invention is shown in FIG. 5. Thevalidation is run using a set of cables with specific known lengths(step 90). For example, a set of cables with length [0.2 20:10:120] isused. Then the constants K₁ and K₂ are found using a best linear fit tothe real length vector (step 92). The constant K₁ is verified directlyfrom the channel spectrum (step 94). Using the value of 0.2 meter,calculate C₂ (step 96). Finally, constant C₁ is found from the graph ofC₁=(slp−C₂)/LEN (step 98) and the constant K₂ is verified usingK₂=100/[A(f1)−A(f2)].

As an example, the following values for the constants were determinedfrom the graph of the slope:

C₁=0.021

C₂=−5.56

K₁=−C₂/C₁=˜256

K₂=1/C₁=˜47

Verification of K₁: K₁=100/[A(f1)−A(f2)]=100/0.39=256

Fixed-Point Implementation

A block diagram illustrating an example fixed point signal flow of thepresent invention is shown in FIG. 6. The circuit, generally referenced110, comprises a channel select multiplexer 112, input selectmultiplexer 114, Zround 116, multipliers 118, 140, adder 128, rounder122, 126, 148, 152, squarers 124, 150, sin/cos look up table (LUT) 146,NCO 144 and DFT accumulators 120, 142.

In the case of fixed-point implementation of the DFT circuitquantization and log table quantization, (and length calculation unlessperformed in the host) the following applies. Note that although notspecified in FIG. 6, the FFE and DFE coefficients are also selected by amultiplexer between all channels. In the example embodiment presentedherein, regarding the bit allocation in the DFT engine, the NCOcomprises 16-bit for 2 kHz resolution (log₂(125e6/2e3)). The resolutionof the DFT_ACCs 120, 142 are (20, 32) for a 1024 bin DFT. DFT_ACC is set(20, 32) in accordance with simulations. If the sum elements areapproximated as independent, then the sum will be approximately Gaussianwith standard deviation relative to sqrt(N), where N is the DFT length.Simulations have validated this approximation, e.g., for N=256 therequired maximum level is 8.5 and for N=1024 it is 17 (N was multipliedby four so the maximum level was multiplied by sqrt(4)=2).

The rounder 122, 148 (14, 32) and 126, 152 (20, 1024) were also selectedaccording to simulations which resulted in no performance degradation.The input of the cable diagnostics module is rounded to 10-bits usingthe rounder.

Table 2 presented below shows the effect of the input quantization forIEEE model H channels.

TABLE 2 Input bits versus maximum error Input Bits Max Error (meters) 111 10 Zround 1 10 round 1 10 truncate <2  8 4

Table 3 presented below shows the effect of the LOG_TBL size on thelength estimation.

TABLE 3 Effect of LOG_TBL size on length estimation error Max TestNumber Description tbl_bits tbl_width Error (meters) 1 H (20:120) InfInf 2.3 (1.5) 8  8 2.8 (1.7) 8 10   3 (1.8) 10  10 2.6 (1.4) 2 PCHCP(20:120) Inf Inf 1.2 (1) 8  8 1.2 (1.1) 8 10 1.2 (1) 10  10 0.8 (0.8) 3PHCHCP (20:120) Inf Inf 2.5 (1.6) 8  8 2.7 (1.7) 8 10 2.3 (1.8) 10  10  2 (1.4)

Note that the numbers in brackets are for optimal linearitycoefficients. The tests to obtain data for this table were performedwith a theoretical channel model. Configurations are horizontal (H),patch (P) and connector (C).

A block diagram illustrating an example table implementation scheme ofthe present invention is shown in FIG. 7. The circuit, generallyreferenced 160, comprises an input manipulation block 162, LOG table164, LOG block 166 and adder 168. In the example embodiment presentedherein, the LOG_TBL is implemented as an 8-bit table, but access to thetable exploits the logarithmic characteristic of log(a·b)=log(a)+log(b).If the desired value is larger than 8-bits, only first 8-bits are inputto the LOG_TBL and the remaining skipped bits are added afterwards. Theremainder of the bits other than the first 8 MSBs are disregarded. TheLOG_TBL output in this example is 10 bits wide.

Once the values of SLP are obtained, they are then used to calculate thecable length estimate. In the example presented herein, the linearcalibration coefficients can be determined using simulations, e.g.,Matlab ‘lsqcurvefit’ command) such that the SLP point reflects the cablelength, as shown in FIG. 8 where the ‘X’s indicate the maximum errortimes ten, the real length is indicated by the continuous line and theestimated cable length or linearly shifted SLP indicated by dashed line.Note that these calculations were done with single segment IEEE channels(Simwiz simulation). Note also that each length was run ten times andthe largest error measured was 2.6 meters corresponding to 50 metercable length.

It is important to note that a separate calibration of the linearconstants is required for each cable topology tested. The basiccalibration presented herein is for single element IEEE horizontalcables. If the cable topology comprises long patch cables (i.e. morethan 5 meters on each side) or several different segments, differentcalibration constants need to be calculated as described supra thesection entitled “DFT Length Estimation.”

Simulation Results

A diagram illustrating simulation results of a DFT length estimation fora single segment is shown in FIG. 9. The traces in FIG. 9 illustrate asingle segment, horizontal (H) in various lengths. The continuous linerepresents the real length and the dashed line represents the estimatedlength. The dashed trace represents the estimation error times ten. Itcan be seen that the resultant maximal error is below 2 meters at alength of 20 meters. Since the load is matched, there is no reflection.The DFT engine is not quantized in this case.

The output of the cable diagnostics module comprises the calculatedslope, from which the host extracts the cable length using the proceduredescribed supra. Note that the linear calibration coefficients used toconvert the calculated slope to the cable length estimate arepredetermined, and thus must fit the cable topology anticipated. Thesecalibration constants are configured manually, as the mean of differentcable topologies. Note that generating the calibration constants usingonly a single cable topology is likely to yield a large error in thecase of different cable topologies.

A diagram illustrating the slope of the simulated signal spectrum (e.g.,Matlab simulation) is shown in FIG. 10. A diagram illustrating the errorof the simulation of FIG. 10 is shown in FIG. 11. In FIG. 11, thecontinuous line represents the true actual cable length, the dashed linerepresents the estimated cable length from the linear fit, the dottedline represents the equalizer slope (i.e. raw data) and the dashed linerepresents tens times the estimation error.

A diagram illustrating the best linear fit to the signal spectrum slopeis shown in FIG. 12. The results of a Simwiz simulation show the bestlinear fit to the signal spectrum slope where the real length isrepresented as the continuous line and the estimated cable length isindicated by the dashed line. The 1024 bin FFT operation is averagedover 4096 iterations and the channels comprise IEEE channels. Thefrequencies measured are f1=24/1024 and f2=174/1024.

A diagram focusing on the largest difference between the real andestimated lengths is shown in FIG. 13. The real length is represented asthe continuous line and the estimated cable length is indicated by thedashed line. As indicated, the maximal error from the linearapproximation is approximately 2 meters at 90 meter length.

It is intended that the appended claims cover all such features andadvantages of the invention that fall within the spirit and scope of thepresent invention. As numerous modifications and changes will readilyoccur to those skilled in the art, it is intended that the invention notbe limited to the limited number of embodiments described herein.Accordingly, it will be appreciated that all suitable variations,modifications and equivalents may be resorted to, falling within thespirit and scope of the present invention.

1. A method of estimating the cable length of an active link in anetwork, said method comprising the steps of: determining a firstchannel spectrum magnitude at a first frequency and a second channelspectrum magnitude at a second frequency; calculating a channel spectrumslope from said first channel spectrum magnitude and said second channelspectrum magnitude; and calculating said cable length estimate from saidchannel spectrum slope.
 2. The method according to claim 1, wherein saidstep of determining comprises estimating said first channel spectrummagnitude and said second channel spectrum magnitude by performingdiscrete Fourier transform (DFT) operations on a plurality of equalizercoefficients.
 3. The method according to claim 2, wherein said pluralityof equalizer coefficients comprise feed forward equalizer (FFE) anddecision feedback equalizer (DFE) coefficients.
 4. The method accordingto claim 1, wherein said step of determining comprises estimating saidfirst channel spectrum magnitude and said second channel spectrummagnitude by performing a plurality of discrete Fourier transform (DFT)operations on a signal received over said link.
 5. The method accordingto claim 4, further comprising the step of taking an average of theresults of said DFT operations to determine the spectrum magnitude atsaid first frequency and said second frequency.
 6. The method accordingto claim 1, wherein said first frequency is approximately 1.46 MHz andsaid second frequency is approximately 10.6 MHz.
 7. The method accordingto claim 1, wherein said first frequency is approximately 7 MHz and saidsecond frequency is approximately 43 MHz.
 8. The method according toclaim 1, wherein said step of calculating said cable length estimatecomprises the step of calibrating a plurality of linear constants foreach particular cable topology.
 9. The method according to claim 1,wherein said network comprises an Ethernet based network.
 10. Anapparatus for estimating the cable length of an active link in anetwork, comprising: means for measuring a first attenuation over saidlink at a first frequency and a second attenuation over said link at asecond frequency; means for calculating slope as a function of saidfirst attenuation and said second attenuation measurements; and meansfor calculating said cable length estimate as a function of said slopeand linear calibration constants K₁ and K₂.
 11. The apparatus accordingto claim 10, wherein said means for measuring comprises means forperforming discrete Fourier transform (DFT) operations on a plurality ofequalizer coefficients.
 12. The apparatus according to claim 11, whereinsaid plurality of equalizer coefficients comprise feed forward equalizer(FFE) and decision feedback equalizer (DFE) coefficients.
 13. Theapparatus according to claim 10, wherein said means for measuringcomprises means for performing a plurality of discrete Fourier transform(DFT) operations on a signal received over said link
 14. The apparatusaccording to claim 13, wherein said means for performing DFT operationscomprises means for taking an average of the results of said DFToperations to determine the spectrum magnitude at said first frequencyand said second frequency for use in calculating said slope.
 15. Theapparatus according to claim 10, wherein said first frequency isapproximately 1.46 MHz and said second frequency is approximately 10.6MHz.
 16. The apparatus according to claim 10, wherein said firstfrequency is approximately 7 MHz and said second frequency isapproximately 43 MHz.
 17. The apparatus according to claim 10, whereinsaid linear calibration constants K₁ and K₂ are calculated in accordancewith a particular cable topology.
 18. The apparatus according to claim10, wherein said network comprises an Ethernet based network.
 19. Acable modem, comprising: a memory; one or more interface ports; a tunercoupled to a CATV cable having a plurality of channels, said tuneroperative to tune a received broadband signal in accordance with a tunecommand; a PHY circuit coupled to said tuner and operative to generate abaseband signal from the output of said tuner; a cable diagnosticsmodule for estimating the slope of the linear relationship between cableattenuation and length for an active link in a network, said cablediagnostics module comprising: means for measuring a first attenuationover said link at a first frequency and a second attenuation over saidlink at a second frequency; means for calculating slope as a function ofsaid first attenuation and said second attenuation measurements; and aprocessor coupled to said memory, said one or more interface ports, saidtuner, said cable diagnostics module and said PHY circuit, saidprocessor comprising means for calculating said cable length estimate asa function of said slope and linear calibration constants K₁ and K₂. 20.The cable modem according to claim 19, wherein said linear calibrationconstants K₁ and K₂ are calculated in accordance with a particular cabletopology.
 21. The cable modem according to claim 19, wherein saidnetwork comprises an Ethernet based network.
 22. The cable modemaccording to claim 19, wherein said means for measuring comprises meansfor performing discrete Fourier transform (DFT) operations on aplurality of equalizer coefficients.
 23. The cable modem according toclaim 22, wherein said plurality of equalizer coefficients comprise feedforward equalizer (FFE) and decision feedback equalizer (DFE)coefficients.
 24. The cable modem according to claim 19, wherein saidmeans for measuring comprises means for performing a plurality ofdiscrete Fourier transform (DFT) operations on a signal received oversaid link
 25. The cable modem according to claim 24, wherein said meansfor performing DFT operations comprises means for taking an average ofthe results of said DFT operations to determine the spectrum magnitudeat said first frequency and said second frequency for use in calculatingsaid slope.